﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

using CE.Global;

public partial class controls_usrResultMainTitle : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string strResultTitle = "";

        if (Request.Params["ResultTitle"] != null)
        {
            strResultTitle = GetResultTitle(Server.HtmlEncode(Request.Params["ResultTitle"].ToString()));
            if (strResultTitle != string.Empty)
            {
                lblResultMainTitle.Text = strResultTitle;
            }
        }
        else if (Session["ResultTitle"] != null)
        {
            strResultTitle = GetResultTitle(Session["ResultTitle"].ToString());
            if (strResultTitle != string.Empty)
            {
                lblResultMainTitle.Text = strResultTitle;
            }
        }
    }

    private string GetResultTitle(string resultId)
    {
        string retValue = "";
        if (resultId == "100")
        {
            retValue = "All Your Saved Quotes";
        }
        else if (resultId == "101")
        {
            retValue = "All Your " + General.CarServiceName + " Saved Quotes";
        }
        //else if (resultId == "102")
        //{
        //    retValue = "All Your " + General.HFServiceName + " Saved Quotes";
        //}
        //else if (resultId == "103")
        //{
        //    retValue = "All Your " + General.CCServiceName + " Saved Quotes";
        //}
        //else if (resultId == "104")
        //{
        //    retValue = "All Your " + General.PLServiceName + " Saved Quotes";
        //}
        //else if (resultId == "105")
        //{
        //    retValue = "All Your " + General.PAServiceName + " Saved Quotes";
        //}
        //else if (resultId == "106")
        //{
        //    retValue = "All Your " + General.TAServiceName + " Saved Quotes";
        //}
        else if (resultId == "201")
        {
            retValue = "Edit Profile Details";
        }
        else
        {
            retValue = string.Empty;
        }

        return retValue;
    }
}
